﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace AutomationCommand
{
    public class wb_page_data : BasiCommand
    {
        [JsonProperty("dataway")]
        public List<DataWay> DataWay { get; set; }

        public wb_page_data()
        {
            FunctionType = "wb_page_data";
            OtherName = "获取数据";
            SuccessJump = -1;
            FailureJump = -1;
            DataWay = new List<DataWay>();
        }

        public bool Execute()
        {
            // 在这里编写执行命令的逻辑
            // 返回执行结果
            return true; // 假设此处始终成功
        }
    }

    public class DataWay
    {
        [JsonProperty("type")]
        public string Type { get; set; }

        [JsonProperty("by_type")]
        public string ByType { get; set; }

        [JsonProperty("by_content")]
        public string ByContent { get; set; }

        [JsonProperty("keyname")]
        public string KeyName { get; set; }

        [JsonProperty("atbname")]
        public string AtbName { get; set; }
    }
}
